<?

					$campaign->find_deltagere($sessions[0]['id']);
					$karakterer = $campaign->deltagere_individer;
					$karakterer_ny = array();

						foreach($karakterer as $r)
						{
								$element2 = new player_character();
								$element2->find_rollespiller($r['id']);	

								$karakterer_ny[] = array
								(
									'karakter' => $r['navn'],
									'id' => $r['id'],
									'rollespiller' => $element2->rollespiller,
									'id_rollespiller' => $element2->id_rollespiller
								);		
								
						}
					//$data['rollespillere'] = $karakterer_ny;
					$next_session_data = array(
							'rollespillere' => $karakterer_ny,
							"kampagne_id" => $p['kampagne_id'],
							"player_character_id" => $p['pc_id'],
							"player_character_navn" => $p['pc_navn'],
							"next_session_name" => $sessions[0]['navn'],
							"next_session_id" => $sessions[0]['id'],
							"next_session_offgame_start" => $sessions[0]['offgame_start'],
							"next_session_offgame_slut" => $sessions[0]['offgame_slut'],
						);

						$this->load->view("forms/tilmeld_session_form",$next_session_data);
					}
					else {

					echo form_open('core/opret/element_kampagne_relation');						
					echo "<h3 class='rubrik'>Er ikke tilmeldt nogen kampagne</h3> <input type='submit' class='rubrik' value='Meld ".$p['pc_navn']." til '>";	
					//echo "<div id='apply_holder' style='display:block;' >";
		

						echo form_dropdown('id_kampagne', $alle_kampagner, '30');
						echo form_hidden("id_element",$p['pc_id']);
							
						echo form_close();


						//print_r($alle_kampagner);
					//echo "</div>";

					//$this->load->view("toc/left/apply_for_campaign");	
					}



					echo "</div>";	
					
					echo "<ul class='leaders'>";
					foreach($sessions as $s) {
					
						echo "<li><span><b class='rubrik'>".$s['nummer'].".</b> ".anchor("almanak/side/".$s['id'],$s['navn'],"class='ink'")."</span><span><b class='rubrik'>".$s['id']."</b></span>";

						
					}
					echo "</ul>";	
					echo "</div>";
				}

?>
